package com.bknow.config;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import com.bknow.exception.MyException;

@ControllerAdvice
public class ErrorHandler {
	
	@ExceptionHandler(MyException.class)
	public @ResponseBody String exception(MyException e) {
		return e.getMessage();
	}
}
